import Vue from 'vue';

export default function(Comp, props) {
    const Ctor = Vue.extend(Comp);
    const comp = new Ctor({
        porpsData: props,
    });

    comp.$mount();
    document.body.appendChild(comp.$el);

    comp.remove => {
        document.body.removeChild(comp.$el)
    }
    return comp;
}
